Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

breaking: Delete source for cli-plugin-metro, remove from builtin commands #2055

Merged

Conversation

huntie
Copy link
Collaborator

@huntie huntie commented Aug 11, 2023

Summary

Following the work in facebook/react-native#38795 and #2021, this:

  • Removes the source code for the relocated @react-native-community/cli-plugin-metro package, which is now @react-native/community-cli-plugin.
  • Detaches @react-native-community/cli-plugin-metro commands from packages/cli/src/commands/index.ts.

Changelog: [Breaking] The start, bundle, and ram-bundle commands are no longer included with @react-native-community/cli and have moved into the internals of react-native where they will be pre-configured. This must be used in conjunction with the React Native main branch.

Test Plan

In https://github.com/facebook/react-native, the start, bundle and ram-bundle have been re-configured as a CLI plugin by the react-native package.

cd packages/rn-tester/

react-native start

yarn start
image image

react-native bundle

./node_modules/.bin/react-native bundle --entry-file js/RNTesterApp.ios.js --platform ios --bundle-output test-bundle.js
wc test-bundle.js
image image

react-native ram-bundle

./node_modules/.bin/react-native ram-bundle --entry-file js/RNTesterApp.ios.js --platform ios --bundle-output test-bundle.js
wc test-bundle.js
image image

✅ Commands are integrated as before

@huntie huntie changed the title breaking: Delete source for cli-plugin-metro, remove from builtin com… breaking: Delete source for cli-plugin-metro, remove from builtin commands Aug 11, 2023
@github-actions github-actions bot added the docs Documentation change label Aug 11, 2023
packages/cli/package.json Outdated Show resolved Hide resolved
packages/cli/package.json Outdated Show resolved Hide resolved
@huntie huntie force-pushed the remove-cli-plugin-metro branch 3 times, most recently from e07465a to 337041f Compare August 11, 2023 17:24
huntie added a commit to huntie/react-native that referenced this pull request Aug 17, 2023
Summary:
## Context

RFC: Decoupling Flipper from React Native core: react-native-community/discussions-and-proposals#641

## Changes

This change:
- Links the new `react-native/dev-middleware` endpoints into the recently migrated `react-native start` command.
- Adds `react-native/community-cli-plugin` (the migrated [`cli-plugin-metro`](https://github.com/react-native-community/cli/tree/main/packages/cli-plugin-metro)) as a dependency of `react-native`, and hooks in these versions of the `start`, `bundle`, and `ram-bundle` commands via `react-native.config.js`.

Functionally, this means that the new `/open-debugger` endpoint is available on the dev server started by `react-native start` (not yet linked into any UI).

After this PR is merged, the new `community-cli-plugin` package is "linked" and we can remove `cli-plugin-metro` from `react-native-community/cli`: react-native-community/cli#2055.

Changelog: [Internal]

Reviewed By: motiz88

Differential Revision: D47226421

fbshipit-source-id: ba5a914cbda2830d877a1db5845c88de31eebb3e
@huntie
Copy link
Collaborator Author

huntie commented Aug 17, 2023

@thymikee @szymonrybczak Once facebook/react-native#39059 is merged, this will be safe to ship in the next alpha. The removed internally-linked start, bundle, ram-bundle commands are now wired up in https://github.com/huntie/react-native/blob/export-D47226421/packages/react-native/react-native.config.js.

huntie added a commit to huntie/react-native that referenced this pull request Aug 18, 2023
Summary:
Pull Request resolved: facebook#39059

## Context

RFC: Decoupling Flipper from React Native core: react-native-community/discussions-and-proposals#641

## Changes

This change:
- Links the new `react-native/dev-middleware` endpoints into the recently migrated `react-native start` command.
- Adds `react-native/community-cli-plugin` (the migrated [`cli-plugin-metro`](https://github.com/react-native-community/cli/tree/main/packages/cli-plugin-metro)) as a dependency of `react-native`, and hooks in these versions of the `start`, `bundle`, and `ram-bundle` commands via `react-native.config.js`.

Functionally, this means that the new `/open-debugger` endpoint is available on the dev server started by `react-native start` (not yet linked into any UI).

After this PR is merged, the new `community-cli-plugin` package is "linked" and we can remove `cli-plugin-metro` from `react-native-community/cli`: react-native-community/cli#2055.

Changelog: [Internal]

Reviewed By: motiz88

Differential Revision: D47226421

fbshipit-source-id: 0baf304f2554deab4eaf59938d903cf7b691e9c1
huntie added a commit to huntie/react-native that referenced this pull request Aug 18, 2023
Summary:
Pull Request resolved: facebook#39059

## Context

RFC: Decoupling Flipper from React Native core: react-native-community/discussions-and-proposals#641

## Changes

This change:
- Links the new `react-native/dev-middleware` endpoints into the recently migrated `react-native start` command.
- Adds `react-native/community-cli-plugin` (the migrated [`cli-plugin-metro`](https://github.com/react-native-community/cli/tree/main/packages/cli-plugin-metro)) as a dependency of `react-native`, and hooks in these versions of the `start`, `bundle`, and `ram-bundle` commands via `react-native.config.js`.

Functionally, this means that the new `/open-debugger` endpoint is available on the dev server started by `react-native start` (not yet linked into any UI).

After this PR is merged, the new `community-cli-plugin` package is "linked" and we can remove `cli-plugin-metro` from `react-native-community/cli`: react-native-community/cli#2055.

Changelog: [Internal]

Reviewed By: motiz88

Differential Revision: D47226421

fbshipit-source-id: 9d80cc68d68260cb88d090b4a3ca2624d1b73bbc
huntie added a commit to huntie/react-native that referenced this pull request Aug 18, 2023
Summary:
Pull Request resolved: facebook#39059

## Context

RFC: Decoupling Flipper from React Native core: react-native-community/discussions-and-proposals#641

## Changes

This change:
- Links the new `react-native/dev-middleware` endpoints into the recently migrated `react-native start` command.
- Adds `react-native/community-cli-plugin` (the migrated [`cli-plugin-metro`](https://github.com/react-native-community/cli/tree/main/packages/cli-plugin-metro)) as a dependency of `react-native`, and hooks in these versions of the `start`, `bundle`, and `ram-bundle` commands via `react-native.config.js`.

Functionally, this means that the new `/open-debugger` endpoint is available on the dev server started by `react-native start` (not yet linked into any UI).

After this PR is merged, the new `community-cli-plugin` package is "linked" and we can remove `cli-plugin-metro` from `react-native-community/cli`: react-native-community/cli#2055.

Changelog: [Internal]

Reviewed By: motiz88

Differential Revision: D47226421

fbshipit-source-id: 2b96b50591cd0529e3b7f73732f1f8057034860f
huntie added a commit to huntie/react-native that referenced this pull request Aug 18, 2023
Summary:
Pull Request resolved: facebook#39059

## Context

RFC: Decoupling Flipper from React Native core: react-native-community/discussions-and-proposals#641

## Changes

This change:
- Links the new `react-native/dev-middleware` endpoints into the recently migrated `react-native start` command.
- Adds `react-native/community-cli-plugin` (the migrated [`cli-plugin-metro`](https://github.com/react-native-community/cli/tree/main/packages/cli-plugin-metro)) as a dependency of `react-native`, and hooks in these versions of the `start`, `bundle`, and `ram-bundle` commands via `react-native.config.js`.

Functionally, this means that the new `/open-debugger` endpoint is available on the dev server started by `react-native start` (not yet linked into any UI).

After this PR is merged, the new `community-cli-plugin` package is "linked" and we can remove `cli-plugin-metro` from `react-native-community/cli`: react-native-community/cli#2055.

Changelog: [Internal]

Reviewed By: motiz88

Differential Revision: D47226421

fbshipit-source-id: 61a1c39d4f2d1a5ea0ffbc247b7b5f58e57ee8eb
huntie added a commit to huntie/react-native that referenced this pull request Aug 18, 2023
Summary:
Pull Request resolved: facebook#39059

## Context

RFC: Decoupling Flipper from React Native core: react-native-community/discussions-and-proposals#641

## Changes

This change:
- Links the new `react-native/dev-middleware` endpoints into the recently migrated `react-native start` command.
- Adds `react-native/community-cli-plugin` (the migrated [`cli-plugin-metro`](https://github.com/react-native-community/cli/tree/main/packages/cli-plugin-metro)) as a dependency of `react-native`, and hooks in these versions of the `start`, `bundle`, and `ram-bundle` commands via `react-native.config.js`.

Functionally, this means that the new `/open-debugger` endpoint is available on the dev server started by `react-native start` (not yet linked into any UI).

After this PR is merged, the new `community-cli-plugin` package is "linked" and we can remove `cli-plugin-metro` from `react-native-community/cli`: react-native-community/cli#2055.

Changelog: [Internal]

Reviewed By: motiz88

Differential Revision: D47226421

fbshipit-source-id: 6f668afa788541f35450173c04ee4b441cbbe07a
huntie added a commit to huntie/react-native that referenced this pull request Aug 21, 2023
Summary:
Pull Request resolved: facebook#39059

## Context

RFC: Decoupling Flipper from React Native core: react-native-community/discussions-and-proposals#641

## Changes

This change:
- Links the new `react-native/dev-middleware` endpoints into the recently migrated `react-native start` command.
- Adds `react-native/community-cli-plugin` (the migrated [`cli-plugin-metro`](https://github.com/react-native-community/cli/tree/main/packages/cli-plugin-metro)) as a dependency of `react-native`, and hooks in these versions of the `start`, `bundle`, and `ram-bundle` commands via `react-native.config.js`.

Functionally, this means that the new `/open-debugger` endpoint is available on the dev server started by `react-native start` (not yet linked into any UI).

After this PR is merged, the new `community-cli-plugin` package is "linked" and we can remove `cli-plugin-metro` from `react-native-community/cli`: react-native-community/cli#2055.

Changelog: [Internal]

Reviewed By: motiz88

Differential Revision: D47226421

fbshipit-source-id: 0e9fd2da35cdd83086ec949200be62aa25fda78c
huntie added a commit to huntie/react-native that referenced this pull request Aug 21, 2023
Summary:
Pull Request resolved: facebook#39059

## Context

RFC: Decoupling Flipper from React Native core: react-native-community/discussions-and-proposals#641

## Changes

This change:
- Links the new `react-native/dev-middleware` endpoints into the recently migrated `react-native start` command.
- Adds `react-native/community-cli-plugin` (the migrated [`cli-plugin-metro`](https://github.com/react-native-community/cli/tree/main/packages/cli-plugin-metro)) as a dependency of `react-native`, and hooks in these versions of the `start`, `bundle`, and `ram-bundle` commands via `react-native.config.js`.

Functionally, this means that the new `/open-debugger` endpoint is available on the dev server started by `react-native start` (not yet linked into any UI).

After this PR is merged, the new `community-cli-plugin` package is "linked" and we can remove `cli-plugin-metro` from `react-native-community/cli`: react-native-community/cli#2055.

Changelog: [Internal]

Reviewed By: motiz88

Differential Revision: D47226421

fbshipit-source-id: ef43782af9464d7f11cbe92eafc10d241272a9d2
huntie added a commit to huntie/react-native that referenced this pull request Aug 21, 2023
Summary:
Pull Request resolved: facebook#39059

## Context

RFC: Decoupling Flipper from React Native core: react-native-community/discussions-and-proposals#641

## Changes

This change:
- Links the new `react-native/dev-middleware` endpoints into the recently migrated `react-native start` command.
- Adds `react-native/community-cli-plugin` (the migrated [`cli-plugin-metro`](https://github.com/react-native-community/cli/tree/main/packages/cli-plugin-metro)) as a dependency of `react-native`, and hooks in these versions of the `start`, `bundle`, and `ram-bundle` commands via `react-native.config.js`.

Functionally, this means that the new `/open-debugger` endpoint is available on the dev server started by `react-native start` (not yet linked into any UI).

After this PR is merged, the new `community-cli-plugin` package is "linked" and we can remove `cli-plugin-metro` from `react-native-community/cli`: react-native-community/cli#2055.

Changelog: [Internal]

Reviewed By: motiz88

Differential Revision: D47226421

fbshipit-source-id: 774277eea25ae958bddd3a4b32e37e7ea6dbdcea
huntie added a commit to huntie/react-native that referenced this pull request Aug 21, 2023
Summary:
Pull Request resolved: facebook#39059

## Context

RFC: Decoupling Flipper from React Native core: react-native-community/discussions-and-proposals#641

## Changes

This change:
- Links the new `react-native/dev-middleware` endpoints into the recently migrated `react-native start` command.
- Adds `react-native/community-cli-plugin` (the migrated [`cli-plugin-metro`](https://github.com/react-native-community/cli/tree/main/packages/cli-plugin-metro)) as a dependency of `react-native`, and hooks in these versions of the `start`, `bundle`, and `ram-bundle` commands via `react-native.config.js`.

Functionally, this means that the new `/open-debugger` endpoint is available on the dev server started by `react-native start` (not yet linked into any UI).

After this PR is merged, the new `community-cli-plugin` package is "linked" and we can remove `cli-plugin-metro` from `react-native-community/cli`: react-native-community/cli#2055.

Changelog: [Internal]

Reviewed By: motiz88

Differential Revision: D47226421

fbshipit-source-id: 5573a246f56fa099a6e1b036efb39001caeaf1bc
huntie added a commit to huntie/react-native that referenced this pull request Aug 21, 2023
Summary:
Pull Request resolved: facebook#39059

## Context

RFC: Decoupling Flipper from React Native core: react-native-community/discussions-and-proposals#641

## Changes

This change:
- Links the new `react-native/dev-middleware` endpoints into the recently migrated `react-native start` command.
- Adds `react-native/community-cli-plugin` (the migrated [`cli-plugin-metro`](https://github.com/react-native-community/cli/tree/main/packages/cli-plugin-metro)) as a dependency of `react-native`, and hooks in these versions of the `start`, `bundle`, and `ram-bundle` commands via `react-native.config.js`.

Functionally, this means that the new `/open-debugger` endpoint is available on the dev server started by `react-native start` (not yet linked into any UI).

After this PR is merged, the new `community-cli-plugin` package is "linked" and we can remove `cli-plugin-metro` from `react-native-community/cli`: react-native-community/cli#2055.

Changelog: [Internal]

Reviewed By: motiz88

Differential Revision: D47226421

fbshipit-source-id: 41ce0210bbf42a4d82d21fd4d556b7ceafea3c4a
huntie added a commit to huntie/react-native that referenced this pull request Aug 21, 2023
Summary:
Pull Request resolved: facebook#39059

## Context

RFC: Decoupling Flipper from React Native core: react-native-community/discussions-and-proposals#641

## Changes

This change:
- Links the new `react-native/dev-middleware` endpoints into the recently migrated `react-native start` command.
- Adds `react-native/community-cli-plugin` (the migrated [`cli-plugin-metro`](https://github.com/react-native-community/cli/tree/main/packages/cli-plugin-metro)) as a dependency of `react-native`, and hooks in these versions of the `start`, `bundle`, and `ram-bundle` commands via `react-native.config.js`.

Functionally, this means that the new `/open-debugger` endpoint is available on the dev server started by `react-native start` (not yet linked into any UI).

After this PR is merged, the new `community-cli-plugin` package is "linked" and we can remove `cli-plugin-metro` from `react-native-community/cli`: react-native-community/cli#2055.

Changelog: [Internal]

Reviewed By: motiz88

Differential Revision: D47226421

fbshipit-source-id: 22ac9bfee07e9d97ac520a3a03935cf00cec675b
huntie added a commit to huntie/react-native that referenced this pull request Aug 21, 2023
Summary:
Pull Request resolved: facebook#39059

## Context

RFC: Decoupling Flipper from React Native core: react-native-community/discussions-and-proposals#641

## Changes

This change:
- Links the new `react-native/dev-middleware` endpoints into the recently migrated `react-native start` command.
- Adds `react-native/community-cli-plugin` (the migrated [`cli-plugin-metro`](https://github.com/react-native-community/cli/tree/main/packages/cli-plugin-metro)) as a dependency of `react-native`, and hooks in these versions of the `start`, `bundle`, and `ram-bundle` commands via `react-native.config.js`.

Functionally, this means that the new `/open-debugger` endpoint is available on the dev server started by `react-native start` (not yet linked into any UI).

After this PR is merged, the new `community-cli-plugin` package is "linked" and we can remove `cli-plugin-metro` from `react-native-community/cli`: react-native-community/cli#2055.

Changelog: [Internal]

Reviewed By: motiz88

Differential Revision: D47226421

fbshipit-source-id: 892691568dd191ca4702460d75415a79de3673d3
huntie added a commit to huntie/react-native that referenced this pull request Aug 22, 2023
Summary:
Pull Request resolved: facebook#39059

## Context

RFC: Decoupling Flipper from React Native core: react-native-community/discussions-and-proposals#641

## Changes

This change:
- Links the new `react-native/dev-middleware` endpoints into the recently migrated `react-native start` command.
- Adds `react-native/community-cli-plugin` (the migrated [`cli-plugin-metro`](https://github.com/react-native-community/cli/tree/main/packages/cli-plugin-metro)) as a dependency of `react-native`, and hooks in these versions of the `start`, `bundle`, and `ram-bundle` commands via `react-native.config.js`.

Functionally, this means that the new `/open-debugger` endpoint is available on the dev server started by `react-native start` (not yet linked into any UI).

After this PR is merged, the new `community-cli-plugin` package is "linked" and we can remove `cli-plugin-metro` from `react-native-community/cli`: react-native-community/cli#2055.

Changelog: [Internal]

Reviewed By: motiz88

Differential Revision: D47226421

fbshipit-source-id: fac7dc9c3d10043cd42a72dd7e768dcff8564d52
huntie added a commit to huntie/react-native that referenced this pull request Aug 22, 2023
Summary:
Pull Request resolved: facebook#39059

## Context

RFC: Decoupling Flipper from React Native core: react-native-community/discussions-and-proposals#641

## Changes

This change:
- Links the new `react-native/dev-middleware` endpoints into the recently migrated `react-native start` command.
- Adds `react-native/community-cli-plugin` (the migrated [`cli-plugin-metro`](https://github.com/react-native-community/cli/tree/main/packages/cli-plugin-metro)) as a dependency of `react-native`, and hooks in these versions of the `start`, `bundle`, and `ram-bundle` commands via `react-native.config.js`.

Functionally, this means that the new `/open-debugger` endpoint is available on the dev server started by `react-native start` (not yet linked into any UI).

After this PR is merged, the new `community-cli-plugin` package is "linked" and we can remove `cli-plugin-metro` from `react-native-community/cli`: react-native-community/cli#2055.

Changelog: [Internal]

Reviewed By: motiz88

Differential Revision: D47226421

fbshipit-source-id: b422e1b88d59cbe278dab25e461f62a548f2e9e6
huntie added a commit to huntie/react-native that referenced this pull request Aug 22, 2023
Summary:
Pull Request resolved: facebook#39059

## Context

RFC: Decoupling Flipper from React Native core: react-native-community/discussions-and-proposals#641

## Changes

This change:
- Links the new `react-native/dev-middleware` endpoints into the recently migrated `react-native start` command.
- Adds `react-native/community-cli-plugin` (the migrated [`cli-plugin-metro`](https://github.com/react-native-community/cli/tree/main/packages/cli-plugin-metro)) as a dependency of `react-native`, and hooks in these versions of the `start`, `bundle`, and `ram-bundle` commands via `react-native.config.js`.

Functionally, this means that the new `/open-debugger` endpoint is available on the dev server started by `react-native start` (not yet linked into any UI).

After this PR is merged, the new `community-cli-plugin` package is "linked" and we can remove `cli-plugin-metro` from `react-native-community/cli`: react-native-community/cli#2055.

Changelog: [Internal]

Reviewed By: motiz88

Differential Revision: D47226421

fbshipit-source-id: 5322b4e2dbc7f2eb83fa8351b635d9fb22ad8e02
huntie added a commit to huntie/react-native that referenced this pull request Aug 22, 2023
Summary:
Pull Request resolved: facebook#39059

## Context

RFC: Decoupling Flipper from React Native core: react-native-community/discussions-and-proposals#641

## Changes

This change:
- Links the new `react-native/dev-middleware` endpoints into the recently migrated `react-native start` command.
- Adds `react-native/community-cli-plugin` (the migrated [`cli-plugin-metro`](https://github.com/react-native-community/cli/tree/main/packages/cli-plugin-metro)) as a dependency of `react-native`, and hooks in these versions of the `start`, `bundle`, and `ram-bundle` commands via `react-native.config.js`.

Functionally, this means that the new `/open-debugger` endpoint is available on the dev server started by `react-native start` (not yet linked into any UI).

After this PR is merged, the new `community-cli-plugin` package is "linked" and we can remove `cli-plugin-metro` from `react-native-community/cli`: react-native-community/cli#2055.

Changelog: [Internal]

Reviewed By: motiz88

Differential Revision: D47226421

fbshipit-source-id: eee439daf7801a847eb3db9175f447e785230ed6
facebook-github-bot pushed a commit to facebook/react-native that referenced this pull request Aug 22, 2023
Summary:
Pull Request resolved: #39059

## Context

RFC: Decoupling Flipper from React Native core: react-native-community/discussions-and-proposals#641

## Changes

This change:
- Links the new `react-native/dev-middleware` endpoints into the recently migrated `react-native start` command.
- Adds `react-native/community-cli-plugin` (the migrated [`cli-plugin-metro`](https://github.com/react-native-community/cli/tree/main/packages/cli-plugin-metro)) as a dependency of `react-native`, and hooks in these versions of the `start`, `bundle`, and `ram-bundle` commands via `react-native.config.js`.

Functionally, this means that the new `/open-debugger` endpoint is available on the dev server started by `react-native start` (not yet linked into any UI).

After this PR is merged, the new `community-cli-plugin` package is "linked" and we can remove `cli-plugin-metro` from `react-native-community/cli`: react-native-community/cli#2055.

Changelog: [Internal]

Reviewed By: motiz88

Differential Revision: D47226421

fbshipit-source-id: 123039961f93bd8183a32a2d3f30c447f7c0f132
@huntie huntie marked this pull request as ready for review August 22, 2023 16:24
@huntie huntie requested a review from adamTrz as a code owner August 22, 2023 16:24
@huntie
Copy link
Collaborator Author

huntie commented Aug 23, 2023

@thymikee @szymonrybczak Ready to merge.

Latest synced changes to cli-plugin-metro were merged in:

huntie added a commit to huntie/react-native that referenced this pull request Aug 23, 2023
Summary:
Will be referenced in react-native-community/cli#2055.

Changelog: [Internal]

bypass-github-export-checks

Differential Revision: D48603224

fbshipit-source-id: 9dce230f8d885c031a7a0c7620a028afc2253fba
huntie added a commit to huntie/react-native that referenced this pull request Aug 23, 2023
Summary:
Pull Request resolved: facebook#39127

Will be referenced in react-native-community/cli#2055.

Changelog: [Internal]

bypass-github-export-checks

Differential Revision: D48603224

fbshipit-source-id: 4d9f4ebc4226795db570b897bc16fa916c9daf0b
huntie added a commit to huntie/react-native that referenced this pull request Aug 23, 2023
Summary:
Pull Request resolved: facebook#39127

Will be referenced in react-native-community/cli#2055.

Changelog: [Internal]

bypass-github-export-checks

Reviewed By: motiz88

Differential Revision: D48603224

fbshipit-source-id: ac98565cf2f739e02f3d552522fa7ab39ebb9771
facebook-github-bot pushed a commit to facebook/react-native that referenced this pull request Aug 23, 2023
Summary:
Pull Request resolved: #39127

Will be referenced in react-native-community/cli#2055.

Changelog: [Internal]

bypass-github-export-checks

Reviewed By: motiz88

Differential Revision: D48603224

fbshipit-source-id: 0b31d765f912cf8efe4300f7490ccef3ac843a41
@thymikee thymikee merged commit 80c84d0 into react-native-community:main Sep 6, 2023
6 checks passed
@huntie huntie deleted the remove-cli-plugin-metro branch September 6, 2023 07:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants